home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c,comp.unix.programmer
- Subject: Re: Q: '\n' character
- Date: Fri, 19 Apr 1996 13:10:28 GMT
- Organization: Netcom
- Message-ID: <31778fd7.139227668@nntp.ix.netcom.com>
- References: <4kj66f$k0o@ren.cei.net> <4kmdsv$ojc@masala.cc.uh.edu> <4kmhpsINN7ak@keats.ugrad.cs.ubc.ca> <AD97189A966891F2@mcdiala02.it.luc.edu> <4ktn04INNoev@keats.ugrad.cs.ubc.ca> <3176A389.4E48@connix.com>
- NNTP-Posting-Host: ix-dc14-19.ix.netcom.com
- X-NETCOM-Date: Fri Apr 19 8:14:02 AM CDT 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- Scott Hawley <shawley@connix.com> wrote:
-
- > >Having a return value that is the same as one of the arguments is
- > >a complete waste of a ``data path'' that could be used to return
- > >pertinent information.
- >
- > My manual says fgets returns the string pointed to by s or a NULL
- > on end-of-file. I would say finding the end of file is pretty
- > pertinent, wouldn't you?
-
- But if it returned the number of characters read it could still return
- that information on end of file by returning EOF. When not at end of
- file it would return something useful.
-
- This would also have the advantage of being more consistent with other
- stream i/o functions.
-
- Michael M Rubenstein
-